<?php


namespace App\Dao;


use App\Model\TaskType;

class TaskTypeDao extends AbstractDao
{
    public function where(array $where): \Hyperf\Database\Model\Builder
    {

        $builder = TaskType::query();

        foreach ($where as $field => $value) {
            switch ($field) {
                case 'cooperative_id':
                    $builder->where('cooperative_id', $value);
                    break;
                default:
                    $builder->where($field, $value);
            }
        }

        return $builder;
    }
}